package ldkxingzhe.l365calendar.model;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 待办事项的实体
 * Created by ke on 16-1-30.
 */
public class NoteEntity implements Parcelable{
    int _id, state, priority;
    long created, modified, finishTime, deadline;
    String title, tags, uuid;

    public static final Parcelable.Creator<NoteEntity> CREATOR = new Creator<NoteEntity>() {
        @Override
        public NoteEntity createFromParcel(Parcel source) {
            return new NoteEntity(source);
        }

        @Override
        public NoteEntity[] newArray(int size) {
            return new NoteEntity[size];
        }
    };

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeInt(_id);
        dest.writeInt(state);
        dest.writeInt(priority);
        dest.writeLong(created);
        dest.writeLong(modified);
        dest.writeLong(finishTime);
        dest.writeLong(deadline);
        dest.writeString(title);
        dest.writeString(tags);
        dest.writeString(uuid);
    }

    private NoteEntity(Parcel in){
        _id = in.readInt();
        state = in.readInt();
        priority = in.readInt();
        created = in.readInt();
        modified = in.readLong();
        finishTime = in.readLong();
        deadline = in.readLong();
        title = in.readString();
        tags = in.readString();
        uuid = in.readString();
    }

    public NoteEntity(){
    }

    public int get_id() {
        return _id;
    }

    public void set_id(int _id) {
        this._id = _id;
    }

    public int getState() {
        return state;
    }

    public void setState(int state) {
        this.state = state;
    }

    public int getPriority() {
        return priority;
    }

    public void setPriority(int priority) {
        this.priority = priority;
    }

    public long getCreated() {
        return created;
    }

    public void setCreated(long created) {
        this.created = created;
    }

    public long getModified() {
        return modified;
    }

    public void setModified(long modified) {
        this.modified = modified;
    }

    public long getFinishTime() {
        return finishTime;
    }

    public void setFinishTime(long finishTime) {
        this.finishTime = finishTime;
    }

    public long getDeadline() {
        return deadline;
    }

    public void setDeadline(long deadline) {
        this.deadline = deadline;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTags() {
        return tags;
    }

    public void setTags(String tags) {
        this.tags = tags;
    }

    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }
}
